home *** CD-ROM | disk | FTP | other *** search
- #!/usr/local/bin/snow -f
-
- ;; Copyright (c) 1996 Harvey J. Stein <abel@netvision.net.il>, and
- ;; eventually <hjstein@netvision.net.il>
- ;; All Rights Reserved.
- ;;
- ;; This package is covered by the GNU GPL. You can freely use and
- ;; distribute it as long as it stays under the GNU GPL, and as long as
- ;; you distribute all the corresponding source code, and as long as this
- ;; message and the above copyright notice remains.
-
- (cond ((< *argc* 1)
- (format #t "~a" "
- Usage: make-test-routines <si-info-files>
-
- Reads each si-info file and writes out readers, writers, and drivers
- for each subroutine and function declared in each file. si-info files
- can be created by fts-f2si. This routine is known to have the
- following faults when used on raw fts-f2si output:
-
- -Use of * in array declarations.
- You'll need replace asterisks in pff calls with the correct
- array length.
- -Character strings in general.
- You'll see calls to pff_unknown_guy. One can use pff_wrstr for
- writing, but there's no dual for reading. You'll have to decide
- whether to use unmatched readers and writers or to skip the
- strings.
- -Multiple dimension arrays.
- You'll see calls to pff_unknown_guy - You'll have to fix up the
- calls. It might also screw up the argument list.
- -Cases where the array size comes after the array in the argument
- list.
- You'll need to rearrange the order of the pff calls.
-
- Some of these can be corrected by modifying the original fortran code
- or editing the .si file.
- \n")
- (exit 1)))
-
-
- (require "si-lib")
-
- (for-each (lambda (fnam)
- (with-input-from-file fnam
- (lambda () (let loop ((si-decl (read)))
- (unless (eof-object? si-decl)
- (make-reader-and-writer si-decl)
- (loop (read)))))))
- *argv*)
-